<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html 
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:p="http://primefaces.org/ui"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		>
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Change Category</title>
</h:head>
<h:body>
<br/>
<br/>
<br/>
<p:menubar>
    <p:menuitem value="Home" url="home.jsf" />
    <p:submenu label="#{rotulos.labelMenuMetricsCategories}" icon="ui-icon-document">
        <p:menuitem value="#{rotulos.labelCreateCategory}" url="registerCategory.jsf" />
        <p:menuitem value="#{rotulos.labelManageCategory}" url="consultCategory.jsf"/>
    </p:submenu>
    <p:submenu label="#{rotulos.labelMenuMetrics}" icon="ui-icon-document">
        <p:menuitem value="#{rotulos.labelCreateMetric}" url="registerMetric.jsf"/>
        <p:menuitem value="#{rotulos.labelManageMetric}" url="consultMetric.jsf" />

    </p:submenu>
    <p:submenu label="#{rotulos.labelMenuMetricProjects}" icon="ui-icon-document">
        
    </p:submenu>
    <p:menuitem value="#{rotulos.labelExit}" url="#" icon="ui-icon ui-icon-power" />
    
    <f:facet name="options">
        <form action="/MetricTools/logoutServlet" method="get">
            <h:commandButton type="submit" value="Logout"/>
        </form>
    </f:facet>
</p:menubar>

<center>
    <p:panel header="#{rotulos.changeMetric}" style="text-align:left;width:700px;">
    <h1><center>#{rotulos.changeMetric}</center></h1>
        <div align="center">
            <h:form id ="teste">
		<h:panelGrid cellpadding="5" columns="3">
			<h:outputLabel value="#{rotulos.nameMetric}" for="nome"/>
                        <h:inputText id="name" value="#{categoryController.category.name}" required="true"/><br/>
                        
                        <h:outputLabel value="#{rotulos.labelGoal}"/>
                        <h:inputText id="goal" value="#{categoryController.category.goal}" required="true" validatorMessage="Preench"/><br/>

			<center>
                            <p:commandButton ajax="false" action="#{categoryController.changeCategory}" value="#{rotulos.labelChange}"/>
                            <p:commandButton ajax="false" actionListener="#{categoryController.clearCategory}" value="#{rotulos.labelClear}"/>
			</center>
		<p:growl id="messages" showDetail="true"/>
		</h:panelGrid>

            </h:form>
        </div>
</p:panel>
</center>
</h:body>
</html>
